package com.ysd.lis.util.qcrule;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
public class Result {
    /// <summary>
    /// 结果Id
    /// </summary>
    public String id ;

    /// <summary>
    /// 质控物Id
    /// </summary>
    public String qCMaterialId;

    /// <summary>
    /// 质控物批次Id
    /// </summary>
    public String qCMaterialBatchId ;

    /// <summary>
    /// 质控测试批号
    /// </summary>
    public String qCBatchNo ;

    /// <summary>
    /// 均值
    /// </summary>
    public double mean  = 0;
    /// <summary>
    /// SD
    /// </summary>
    public double sd = 1;
    /// <summary>
    /// 结果值
    /// </summary>
    public double numResult = 0;

    /// <summary>
    /// Z
    /// </summary>
    public double zvalue =(sd==0?0:(numResult - mean) / sd);


    /// <summary>
    ///是否失控
    ///仅记录本次判断是否失控
    /// </summary>
    public Boolean isOutControl = false;

    /// <summary>
    /// 失控信息
    /// </summary>
    public List<OutControlInfo> outControlInfos;

    public Result()
    {
        outControlInfos = new ArrayList<>();
    }
}
